<?php
namespace app\index\controller;
use think\Db;

class Member
{
    public  function  changePassword(){
        return view("change-password");
    }
    public  function changePasswordUpdate(){
        $password=input('newpassword');
        $password2=input('newpassword2');
        if($password==$password2&&!empty($password)){
            $name=gc('userData')['name'];
            if($name){
                $data=Db::execute("update raCall_user set password='{$password}' where FLocalNum='{$name}'");
                return $data;
            }
        }
    }
}